#include "wxSceneView.h"
#include "wxSceneCanvas.h"
#include <osg/Notify>
// ===========================================================================
// wxSceneCanvas::View implementation
// ===========================================================================

wxSceneView::wxSceneView()
{
	_canvas = NULL;
}

void wxSceneView::setCanvas(wxSceneCanvas* canvas)
{
	_canvas = canvas;
}

void wxSceneView::requestRedraw()
{
	if (_canvas)
		_canvas->Refresh();
}

void wxSceneView::requestContinuousUpdate(bool needed)
{
	if (_canvas)
		_canvas->updateWhenIdle(needed);
}

void wxSceneView::requestWarpPointer(float x,float y)
{
	osg::notify(osg::WARN) << "wxSceneCanvas::View::requestWarpPointer() : unimplemented" << std::endl;
}
bool wxSceneView::isValid() const
{
	return _canvas?_canvas->IsShownOnScreen():false;
}
